﻿using System.Web.UI;
using Telerik.Web.UI;

namespace AutoStopApp.Core
{
    public class AjaxPage : RadAjaxPage
    {
        public RadAjaxManager AjaxManager { get; set; }

        public RadAjaxLoadingPanel LoadingPanel { get; set; }

        protected void AddAjaxSetting(Control ajaxifiedControl, Control updatedControl)
        {
            AjaxManager.AjaxSettings.AddAjaxSetting(ajaxifiedControl, updatedControl, LoadingPanel);
        }

        public void InitializeAjaxControls(RadAjaxManager ajaxManager, RadAjaxLoadingPanel loadingPanel)
        {
            AjaxManager = ajaxManager;
            LoadingPanel = loadingPanel;
        }
    }
}